import 'package:flutter/material.dart';
import 'package:myflutter/PageView/PushDemo.dart';

class MainNewPageWidget extends StatefulWidget {
  @override
  _MainNewPageWidgetState createState() => _MainNewPageWidgetState();
}

class _MainNewPageWidgetState extends State<MainNewPageWidget> {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: MaterialButton (
          minWidth:250,
          height:100,
          color:Colors.blue,
          textColor: Colors.white,
          child: Text(
             "跳转",
             textAlign: TextAlign.center,
             style:TextStyle(
               color:Colors.white,
              //  backgroundColor: Colors.yellow,
               fontSize: 25,
             )
          ),
          
          clipBehavior: Clip.none, 
          onPressed: () { 
            ///路由跳转
            Navigator.push(context, MaterialPageRoute(builder: (_) {
               return new MyPushDemoWidget();
            }));        
          },
          
       ),
    );
  }
}